import random, math, time
import sys, os
import game_interface
import NeuralNetwork

brains = []

def getNextBrain():
	global brains
	
	nextBrain = NeuralNetwork.Brain()
	brainPath = "./brain" + str(len(brains)+1)
	nextBrain.path = brainPath
	if os.path.isfile(brainPath): nextBrain.load()
	
	brains.append(nextBrain)
	
	return nextBrain

#(not using this right now...)
def replaceBrainWithClone(brainWeak, brainStrong):
	if os.path.isfile(brainWeak.path): os.path.remove(brainWeak.path)
	clone = NeuralNetwork.clone(brainStrong)
	clone.saveToPath(brainWeak.path)